package org.example.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.example.pojo.User;

@Mapper
public interface UserMapper {

    /*
    * 根据用户名查询用户
    * */
    User findByUsername(String username);

    /*
    * 登录查询
    * */
    User getUsernameAndPassword(User user);

    /*
    * 修改密码
    * */
    void updatePassword(Integer id, String newPassword);

    /*
    * 根据密码查询用户
    * */
    User getUserByPassword(String oldPassword);
}
